home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / c / tchk21ex.zip / DEMODISK.C < prev    next >
C/C++ Source or Header  |  1989-06-06  |  680b  |  24 lines

  1. /* TCHK 2.1 - Howard Kapustein's Turbo C library        6-6-89      */
  2. /* Copyright (C) 1988,1989 Howard Kapustein.  All rights reserved.  */
  3.  
  4. /* demodisk.c  -  used for testing TCHK disktype() function */
  5.  
  6. #include <ibm.h>
  7. #include <dos.h>
  8. #include <stdio.h>
  9.  
  10. void main();
  11.  
  12. void main()
  13. {
  14.     byte id, drives;
  15.  
  16.     printf("DemoDisk.c  -  a demonstration of disktype() from TCHK\n\n");
  17.  
  18.     for (drives=1; drives<26; drives++)     /* drives A - Z */
  19.         if ((id = disktype(drives)) != DISK_INVALID)    /* valid drive? */
  20.             printf("Drive %c: has an id byte of %X\n",64+drives,id);
  21.  
  22.     printf("\nSee ibm.h for explanations of the id byte\n");
  23. }
  24.